#include <QtGui/QApplication>
#include "mainwindow.h"
#include <QStringList>
#include <QTranslator>
#include <QLibraryInfo>
#include <QMessageBox>

QString program_dir("");

int main(int argc, char *argv[]) {
    QApplication a(argc, argv);
    QTranslator translator;
//    translator.load(QLocale::system().name());

     translator.load("qt_" + QLocale::system().name(),
             QLibraryInfo::location(QLibraryInfo::TranslationsPath));
    program_dir = qApp->applicationDirPath();
    QStringList tops;
    tops<<"0";
    MainWindow w(0, tops);
    w.show();
    qApp->installTranslator(&translator);
    return a.exec();
}
